home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / ghostscr / todo.doc < prev    next >
Encoding:
Text File  |  1991-01-03  |  3.8 KB  |  101 lines

  1.    Copyright (C) 1989, 1990 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.
  19.  
  20. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  21.  
  22. This file, todo.doc, contains a somewhat incoherent set of notes about
  23. things that could be improved in Ghostscript.
  24.  
  25. For an overview of Ghostscript and a list of the documentation files, see
  26. README.
  27.  
  28. Storage manager
  29. ===============
  30.  
  31. Save & restore
  32. --------------
  33.  
  34. Some unobvious things that need to be saved/restored:
  35.     - Names added to the name table must be removed.
  36.     - Dictionary access changes must be undone.
  37.     - The packing state must be restored.
  38.  
  39. Reclamation
  40. -----------
  41.  
  42. Put a prefix on every object that carries its type and size.  Use the type
  43. to index a table of type descriptors.  One of the elements of the type
  44. descriptor is a procedure that knows where to find all the pointers
  45. embedded in the object.  (This is needed for recursive freeing.)  For the
  46. library level, we need a bit in the prefix to say "the client is holding a
  47. reference to this object", and explicit freeing operations, because C
  48. doesn't give us the handles we need to find references.
  49.  
  50. Handle subrange objects differently.  Define two new types t_subarray
  51. and t_substring.  These carry their size, and point to an intermediate
  52. object that references the main object and an offset within it.
  53.  
  54. Interpreter
  55. -----------
  56.  
  57. Allocate stacks in chunks, again like obstack.  Detect overflow in the
  58. interpreter (except for the few operators that can push an unbounded
  59. amount of information) and skim off the top 20% of the current chunk
  60. into a new one.  Detect underflow in the interpreter (except for the few
  61. operators that take an unbounded number of operands) and pop back to the
  62. previous chunk.  Do this for all 3 stacks.
  63.  
  64. Notes on reference counting
  65. ---------------------------
  66.  
  67. The current sources use a set of macros that are supposed to prepare the
  68. way for a reference-counting storage manager.  Here is a list of places
  69. where things are known not to work quite right.
  70.  
  71. In the following places, a ref* argument is passed to a procedure that
  72. may store a pointer ref, possibly requiring reference counting.
  73.     dict_create (pref)
  74.     name_ref (pref)
  75.     name_string_ref (psref)
  76.     name_enter (pref)
  77.  
  78. The following places hold pointers that are not refs.
  79.     name->pvalue
  80.     dict_find ppvalue return value
  81.  
  82. There are many, many places in the scanner that store refs.  We haven't
  83. done anything about any of them.
  84.  
  85. We do NOT count references from the graphics state.
  86.  
  87. The **REAL** to-do list
  88. =======================
  89.  
  90. The REAL to-do list is the bug list in readme.doc.  Here are some other
  91. odds and ends.  Things marked with ** are partially implemented.
  92.  
  93.     ** Move error names from ghost.ps to interpreter
  94.     ** Change to the new GNU license
  95.     Implement trailing moveto in Type 1 characters
  96.     Allow (|cmd) or (cmd|) as file names on Unix (at least)
  97.     Detect tail recursion in executable strings (pop when string is empty)
  98.     Put Ghostscript extended operators in a separate dictionary?
  99.     Make stacks expandable?
  100.     Automatically expand dicts?
  101.